package com.example.controller;


import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.common.result.Result;
import com.example.entity.yifei.Moctg;
import com.example.service.MoctgService;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Lan
 * @since 2024-11-27
 */
@RestController
@RequestMapping("/api/moctg")
public class MoctgController {

    @Autowired
    private MoctgService moctgService;


    @ApiOperation("testMoctgService")
    @PostMapping("testMoctgService")
    @DSTransactional
    public Result list() {

        List<Moctg> list = moctgService.list(new LambdaQueryWrapper<Moctg>().eq(Moctg::getTg002, "1561351653"));

        return Result.success(list);
    }

}
